#include<stdio.h>
#include<unistd.h>
#include<string.h>
int main()
{
  int i=0;
  char proc[102];
  memset(proc,'\0',sizeof(proc));
  const char* arr = "/-|\\";
  while(i<=100)
  {
    printf("[%-100s][%d%%][%c]\r",proc,i,arr[i%4]);
    fflush(stdout);
    proc[i]='#';
    usleep(6000);
    i++;
  }
  printf("\n");
  return 0;
}
